<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude
           , BangPatterns
           , NondecreasingIndentation
           , MagicHash
  #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# OPTIONS_GHC -funbox-strict-fields #-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Module      :  GHC.IO.Encoding.UTF8</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow, 2009</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- </span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Portability :  non-portable</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- UTF-8 Codec for the IO library</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- Portions Copyright   : (c) Tom Harper 2008-2009,</span><span>
</span><span id="line-22"></span><span class="hs-comment">--                        (c) Bryan O'Sullivan 2009,</span><span>
</span><span id="line-23"></span><span class="hs-comment">--                        (c) Duncan Coutts 2009</span><span>
</span><span id="line-24"></span><span class="hs-comment">--</span><span>
</span><span id="line-25"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.IO.Encoding.UTF8</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-28"></span><span>  </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8"><span class="hs-identifier">utf8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#mkUTF8"><span class="hs-identifier">mkUTF8</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>  </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_bom"><span class="hs-identifier">utf8_bom</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#mkUTF8_bom"><span class="hs-identifier">mkUTF8_bom</span></a></span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IORef.html"><span class="hs-identifier">GHC.IORef</span></a></span><span>
</span><span id="line-36"></span><span class="hs-comment">-- import GHC.IO</span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.Buffer.html"><span class="hs-identifier">GHC.IO.Buffer</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html"><span class="hs-identifier">GHC.IO.Encoding.Failure</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html"><span class="hs-identifier">GHC.IO.Encoding.Types</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Word.html"><span class="hs-identifier">GHC.Word</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Bits.html"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8"><span class="hs-identifier hs-type">utf8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextEncoding"><span class="hs-identifier hs-type">TextEncoding</span></a></span><span>
</span><span id="line-44"></span><span id="utf8"><span class="annot"><span class="annottext">utf8 :: TextEncoding
</span><a href="GHC.IO.Encoding.UTF8.html#utf8"><span class="hs-identifier hs-var hs-var">utf8</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode -&gt; TextEncoding
</span><a href="GHC.IO.Encoding.UTF8.html#mkUTF8"><span class="hs-identifier hs-var">mkUTF8</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="GHC.IO.Encoding.Failure.html#ErrorOnCodingFailure"><span class="hs-identifier hs-var">ErrorOnCodingFailure</span></a></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-comment">-- | @since 4.4.0.0</span><span>
</span><span id="line-47"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#mkUTF8"><span class="hs-identifier hs-type">mkUTF8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html#CodingFailureMode"><span class="hs-identifier hs-type">CodingFailureMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextEncoding"><span class="hs-identifier hs-type">TextEncoding</span></a></span><span>
</span><span id="line-48"></span><span id="mkUTF8"><span class="annot"><span class="annottext">mkUTF8 :: CodingFailureMode -&gt; TextEncoding
</span><a href="GHC.IO.Encoding.UTF8.html#mkUTF8"><span class="hs-identifier hs-var hs-var">mkUTF8</span></a></span></span><span> </span><span id="local-6989586621679545271"><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545271"><span class="hs-identifier hs-var">cfm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextEncoding :: forall dstate estate.
String
-&gt; IO (TextDecoder dstate)
-&gt; IO (TextEncoder estate)
-&gt; TextEncoding
</span><a href="GHC.IO.Encoding.Types.html#TextEncoding"><span class="hs-identifier hs-type">TextEncoding</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">textEncodingName :: String
</span><a href="GHC.IO.Encoding.Types.html#textEncodingName"><span class="hs-identifier hs-var">textEncodingName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-8&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>                            </span><span class="annot"><span class="annottext">mkTextDecoder :: IO (TextDecoder ())
</span><a href="GHC.IO.Encoding.Types.html#mkTextDecoder"><span class="hs-identifier hs-var">mkTextDecoder</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode -&gt; IO (TextDecoder ())
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_DF"><span class="hs-identifier hs-var">utf8_DF</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545271"><span class="hs-identifier hs-var">cfm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>                            </span><span class="annot"><span class="annottext">mkTextEncoder :: IO (TextEncoder ())
</span><a href="GHC.IO.Encoding.Types.html#mkTextEncoder"><span class="hs-identifier hs-var">mkTextEncoder</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode -&gt; IO (TextEncoder ())
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_EF"><span class="hs-identifier hs-var">utf8_EF</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545271"><span class="hs-identifier hs-var">cfm</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_DF"><span class="hs-identifier hs-type">utf8_DF</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html#CodingFailureMode"><span class="hs-identifier hs-type">CodingFailureMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextDecoder"><span class="hs-identifier hs-type">TextDecoder</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span id="utf8_DF"><span class="annot"><span class="annottext">utf8_DF :: CodingFailureMode -&gt; IO (TextDecoder ())
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_DF"><span class="hs-identifier hs-var hs-var">utf8_DF</span></a></span></span><span> </span><span id="local-6989586621679545264"><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545264"><span class="hs-identifier hs-var">cfm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-55"></span><span>  </span><span class="annot"><span class="annottext">TextDecoder () -&gt; IO (TextDecoder ())
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BufferCodec :: forall from to state.
CodeBuffer from to
-&gt; (Buffer from -&gt; Buffer to -&gt; IO (Buffer from, Buffer to))
-&gt; IO ()
-&gt; IO state
-&gt; (state -&gt; IO ())
-&gt; BufferCodec from to state
</span><a href="GHC.IO.Encoding.Types.html#BufferCodec"><span class="hs-identifier hs-type">BufferCodec</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-56"></span><span>             </span><span class="annot"><span class="annottext">encode :: CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.Types.html#encode"><span class="hs-identifier hs-var">encode</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_decode"><span class="hs-identifier hs-var">utf8_decode</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>             </span><span class="annot"><span class="annottext">recover :: Buffer Word8 -&gt; Buffer Char -&gt; IO (Buffer Word8, Buffer Char)
</span><a href="GHC.IO.Encoding.Types.html#recover"><span class="hs-identifier hs-var">recover</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
-&gt; Buffer Word8 -&gt; Buffer Char -&gt; IO (Buffer Word8, Buffer Char)
</span><a href="GHC.IO.Encoding.Failure.html#recoverDecode"><span class="hs-identifier hs-var">recoverDecode</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545264"><span class="hs-identifier hs-var">cfm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>             </span><span class="annot"><span class="annottext">close :: IO ()
</span><a href="GHC.IO.Encoding.Types.html#close"><span class="hs-identifier hs-var">close</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>             </span><span class="annot"><span class="annottext">getState :: IO ()
</span><a href="GHC.IO.Encoding.Types.html#getState"><span class="hs-identifier hs-var">getState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>             </span><span class="annot"><span class="annottext">setState :: () -&gt; IO ()
</span><a href="GHC.IO.Encoding.Types.html#setState"><span class="hs-identifier hs-var">setState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; () -&gt; IO ()
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; () -&gt; IO ()) -&gt; IO () -&gt; () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>          </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_EF"><span class="hs-identifier hs-type">utf8_EF</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html#CodingFailureMode"><span class="hs-identifier hs-type">CodingFailureMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextEncoder"><span class="hs-identifier hs-type">TextEncoder</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span id="utf8_EF"><span class="annot"><span class="annottext">utf8_EF :: CodingFailureMode -&gt; IO (TextEncoder ())
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_EF"><span class="hs-identifier hs-var hs-var">utf8_EF</span></a></span></span><span> </span><span id="local-6989586621679545254"><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545254"><span class="hs-identifier hs-var">cfm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-65"></span><span>  </span><span class="annot"><span class="annottext">TextEncoder () -&gt; IO (TextEncoder ())
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BufferCodec :: forall from to state.
CodeBuffer from to
-&gt; (Buffer from -&gt; Buffer to -&gt; IO (Buffer from, Buffer to))
-&gt; IO ()
-&gt; IO state
-&gt; (state -&gt; IO ())
-&gt; BufferCodec from to state
</span><a href="GHC.IO.Encoding.Types.html#BufferCodec"><span class="hs-identifier hs-type">BufferCodec</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-66"></span><span>             </span><span class="annot"><span class="annottext">encode :: CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.Types.html#encode"><span class="hs-identifier hs-var">encode</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_encode"><span class="hs-identifier hs-var">utf8_encode</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-67"></span><span>             </span><span class="annot"><span class="annottext">recover :: Buffer Char -&gt; Buffer Word8 -&gt; IO (Buffer Char, Buffer Word8)
</span><a href="GHC.IO.Encoding.Types.html#recover"><span class="hs-identifier hs-var">recover</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
-&gt; Buffer Char -&gt; Buffer Word8 -&gt; IO (Buffer Char, Buffer Word8)
</span><a href="GHC.IO.Encoding.Failure.html#recoverEncode"><span class="hs-identifier hs-var">recoverEncode</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545254"><span class="hs-identifier hs-var">cfm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-68"></span><span>             </span><span class="annot"><span class="annottext">close :: IO ()
</span><a href="GHC.IO.Encoding.Types.html#close"><span class="hs-identifier hs-var">close</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-69"></span><span>             </span><span class="annot"><span class="annottext">getState :: IO ()
</span><a href="GHC.IO.Encoding.Types.html#getState"><span class="hs-identifier hs-var">getState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>             </span><span class="annot"><span class="annottext">setState :: () -&gt; IO ()
</span><a href="GHC.IO.Encoding.Types.html#setState"><span class="hs-identifier hs-var">setState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; () -&gt; IO ()
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; () -&gt; IO ()) -&gt; IO () -&gt; () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>          </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_bom"><span class="hs-identifier hs-type">utf8_bom</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextEncoding"><span class="hs-identifier hs-type">TextEncoding</span></a></span><span>
</span><span id="line-74"></span><span id="utf8_bom"><span class="annot"><span class="annottext">utf8_bom :: TextEncoding
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom"><span class="hs-identifier hs-var hs-var">utf8_bom</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode -&gt; TextEncoding
</span><a href="GHC.IO.Encoding.UTF8.html#mkUTF8_bom"><span class="hs-identifier hs-var">mkUTF8_bom</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="GHC.IO.Encoding.Failure.html#ErrorOnCodingFailure"><span class="hs-identifier hs-var">ErrorOnCodingFailure</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#mkUTF8_bom"><span class="hs-identifier hs-type">mkUTF8_bom</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html#CodingFailureMode"><span class="hs-identifier hs-type">CodingFailureMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextEncoding"><span class="hs-identifier hs-type">TextEncoding</span></a></span><span>
</span><span id="line-77"></span><span id="mkUTF8_bom"><span class="annot"><span class="annottext">mkUTF8_bom :: CodingFailureMode -&gt; TextEncoding
</span><a href="GHC.IO.Encoding.UTF8.html#mkUTF8_bom"><span class="hs-identifier hs-var hs-var">mkUTF8_bom</span></a></span></span><span> </span><span id="local-6989586621679545251"><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545251"><span class="hs-identifier hs-var">cfm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextEncoding :: forall dstate estate.
String
-&gt; IO (TextDecoder dstate)
-&gt; IO (TextEncoder estate)
-&gt; TextEncoding
</span><a href="GHC.IO.Encoding.Types.html#TextEncoding"><span class="hs-identifier hs-type">TextEncoding</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">textEncodingName :: String
</span><a href="GHC.IO.Encoding.Types.html#textEncodingName"><span class="hs-identifier hs-var">textEncodingName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-8BOM&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-78"></span><span>                                </span><span class="annot"><span class="annottext">mkTextDecoder :: IO (TextDecoder Bool)
</span><a href="GHC.IO.Encoding.Types.html#mkTextDecoder"><span class="hs-identifier hs-var">mkTextDecoder</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode -&gt; IO (TextDecoder Bool)
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_DF"><span class="hs-identifier hs-var">utf8_bom_DF</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545251"><span class="hs-identifier hs-var">cfm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-79"></span><span>                                </span><span class="annot"><span class="annottext">mkTextEncoder :: IO (TextEncoder Bool)
</span><a href="GHC.IO.Encoding.Types.html#mkTextEncoder"><span class="hs-identifier hs-var">mkTextEncoder</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode -&gt; IO (TextEncoder Bool)
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_EF"><span class="hs-identifier hs-var">utf8_bom_EF</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545251"><span class="hs-identifier hs-var">cfm</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_DF"><span class="hs-identifier hs-type">utf8_bom_DF</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html#CodingFailureMode"><span class="hs-identifier hs-type">CodingFailureMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextDecoder"><span class="hs-identifier hs-type">TextDecoder</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span id="utf8_bom_DF"><span class="annot"><span class="annottext">utf8_bom_DF :: CodingFailureMode -&gt; IO (TextDecoder Bool)
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_DF"><span class="hs-identifier hs-var hs-var">utf8_bom_DF</span></a></span></span><span> </span><span id="local-6989586621679545248"><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545248"><span class="hs-identifier hs-var">cfm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-83"></span><span>   </span><span id="local-6989586621679545247"><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545247"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO (IORef Bool)
forall a. a -&gt; IO (IORef a)
</span><a href="GHC.IORef.html#newIORef"><span class="hs-identifier hs-var">newIORef</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-84"></span><span>   </span><span class="annot"><span class="annottext">TextDecoder Bool -&gt; IO (TextDecoder Bool)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BufferCodec :: forall from to state.
CodeBuffer from to
-&gt; (Buffer from -&gt; Buffer to -&gt; IO (Buffer from, Buffer to))
-&gt; IO ()
-&gt; IO state
-&gt; (state -&gt; IO ())
-&gt; BufferCodec from to state
</span><a href="GHC.IO.Encoding.Types.html#BufferCodec"><span class="hs-identifier hs-type">BufferCodec</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-85"></span><span>             </span><span class="annot"><span class="annottext">encode :: CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.Types.html#encode"><span class="hs-identifier hs-var">encode</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_decode"><span class="hs-identifier hs-var">utf8_bom_decode</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545247"><span class="hs-identifier hs-var">ref</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-86"></span><span>             </span><span class="annot"><span class="annottext">recover :: Buffer Word8 -&gt; Buffer Char -&gt; IO (Buffer Word8, Buffer Char)
</span><a href="GHC.IO.Encoding.Types.html#recover"><span class="hs-identifier hs-var">recover</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
-&gt; Buffer Word8 -&gt; Buffer Char -&gt; IO (Buffer Word8, Buffer Char)
</span><a href="GHC.IO.Encoding.Failure.html#recoverDecode"><span class="hs-identifier hs-var">recoverDecode</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545248"><span class="hs-identifier hs-var">cfm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-87"></span><span>             </span><span class="annot"><span class="annottext">close :: IO ()
</span><a href="GHC.IO.Encoding.Types.html#close"><span class="hs-identifier hs-var">close</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-88"></span><span>             </span><span class="annot"><span class="annottext">getState :: IO Bool
</span><a href="GHC.IO.Encoding.Types.html#getState"><span class="hs-identifier hs-var">getState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; IO Bool
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545247"><span class="hs-identifier hs-var">ref</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-89"></span><span>             </span><span class="annot"><span class="annottext">setState :: Bool -&gt; IO ()
</span><a href="GHC.IO.Encoding.Types.html#setState"><span class="hs-identifier hs-var">setState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545247"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-90"></span><span>          </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_EF"><span class="hs-identifier hs-type">utf8_bom_EF</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Failure.html#CodingFailureMode"><span class="hs-identifier hs-type">CodingFailureMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Encoding.Types.html#TextEncoder"><span class="hs-identifier hs-type">TextEncoder</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span id="utf8_bom_EF"><span class="annot"><span class="annottext">utf8_bom_EF :: CodingFailureMode -&gt; IO (TextEncoder Bool)
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_EF"><span class="hs-identifier hs-var hs-var">utf8_bom_EF</span></a></span></span><span> </span><span id="local-6989586621679545242"><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545242"><span class="hs-identifier hs-var">cfm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-94"></span><span>   </span><span id="local-6989586621679545241"><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545241"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO (IORef Bool)
forall a. a -&gt; IO (IORef a)
</span><a href="GHC.IORef.html#newIORef"><span class="hs-identifier hs-var">newIORef</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-95"></span><span>   </span><span class="annot"><span class="annottext">TextEncoder Bool -&gt; IO (TextEncoder Bool)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BufferCodec :: forall from to state.
CodeBuffer from to
-&gt; (Buffer from -&gt; Buffer to -&gt; IO (Buffer from, Buffer to))
-&gt; IO ()
-&gt; IO state
-&gt; (state -&gt; IO ())
-&gt; BufferCodec from to state
</span><a href="GHC.IO.Encoding.Types.html#BufferCodec"><span class="hs-identifier hs-type">BufferCodec</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-96"></span><span>             </span><span class="annot"><span class="annottext">encode :: CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.Types.html#encode"><span class="hs-identifier hs-var">encode</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_encode"><span class="hs-identifier hs-var">utf8_bom_encode</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545241"><span class="hs-identifier hs-var">ref</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-97"></span><span>             </span><span class="annot"><span class="annottext">recover :: Buffer Char -&gt; Buffer Word8 -&gt; IO (Buffer Char, Buffer Word8)
</span><a href="GHC.IO.Encoding.Types.html#recover"><span class="hs-identifier hs-var">recover</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
-&gt; Buffer Char -&gt; Buffer Word8 -&gt; IO (Buffer Char, Buffer Word8)
</span><a href="GHC.IO.Encoding.Failure.html#recoverEncode"><span class="hs-identifier hs-var">recoverEncode</span></a></span><span> </span><span class="annot"><span class="annottext">CodingFailureMode
</span><a href="#local-6989586621679545242"><span class="hs-identifier hs-var">cfm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-98"></span><span>             </span><span class="annot"><span class="annottext">close :: IO ()
</span><a href="GHC.IO.Encoding.Types.html#close"><span class="hs-identifier hs-var">close</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-99"></span><span>             </span><span class="annot"><span class="annottext">getState :: IO Bool
</span><a href="GHC.IO.Encoding.Types.html#getState"><span class="hs-identifier hs-var">getState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; IO Bool
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545241"><span class="hs-identifier hs-var">ref</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-100"></span><span>             </span><span class="annot"><span class="annottext">setState :: Bool -&gt; IO ()
</span><a href="GHC.IO.Encoding.Types.html#setState"><span class="hs-identifier hs-var">setState</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545241"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-101"></span><span>          </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_decode"><span class="hs-identifier hs-type">utf8_bom_decode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#DecodeBuffer"><span class="hs-identifier hs-type">DecodeBuffer</span></a></span><span>
</span><span id="line-104"></span><span id="utf8_bom_decode"><span class="annot"><span class="annottext">utf8_bom_decode :: IORef Bool -&gt; CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_decode"><span class="hs-identifier hs-var hs-var">utf8_bom_decode</span></a></span></span><span> </span><span id="local-6989586621679545238"><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545238"><span class="hs-identifier hs-var">ref</span></a></span></span><span>
</span><span id="line-105"></span><span>  </span><span id="local-6989586621679545237"><span class="annot"><span class="annottext">input :: Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.IO.Buffer.html#Buffer"><span class="hs-identifier hs-type">Buffer</span></a></span><span class="hs-special">{</span><span>  </span><span class="annot"><span class="annottext">bufRaw :: forall e. Buffer e -&gt; RawBuffer e
</span><a href="GHC.IO.Buffer.html#bufRaw"><span class="hs-identifier hs-var">bufRaw</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545234"><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545234"><span class="hs-identifier hs-var">iraw</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufL :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545232"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufR :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545230"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545230"><span class="hs-identifier hs-var">iw</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">bufSize :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufSize"><span class="hs-identifier hs-var">bufSize</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-106"></span><span>  </span><span id="local-6989586621679545228"><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span></span><span>
</span><span id="line-107"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-108"></span><span>   </span><span id="local-6989586621679545227"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679545227"><span class="hs-identifier hs-var">first</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; IO Bool
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545238"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-109"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679545227"><span class="hs-identifier hs-var">first</span></a></span><span>
</span><span id="line-110"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_decode"><span class="hs-identifier hs-var">utf8_decode</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span><span>
</span><span id="line-111"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-112"></span><span>       </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679545224"><span class="annot"><span class="annottext">no_bom :: IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545224"><span class="hs-identifier hs-var hs-var">no_bom</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545238"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_decode"><span class="hs-identifier hs-var">utf8_decode</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span><span>
</span><span id="line-113"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545230"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(CodingProgress, Buffer Word8, Buffer Char)
-&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-114"></span><span>       </span><span id="local-6989586621679545221"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545221"><span class="hs-identifier hs-var">c0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545234"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span>
</span><span id="line-115"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545221"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom0"><span class="hs-identifier hs-var">bom0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545224"><span class="hs-identifier hs-var">no_bom</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-116"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545230"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(CodingProgress, Buffer Word8, Buffer Char)
-&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-117"></span><span>       </span><span id="local-6989586621679545217"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545217"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545234"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545217"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom1"><span class="hs-identifier hs-var">bom1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545224"><span class="hs-identifier hs-var">no_bom</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-119"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545230"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(CodingProgress, Buffer Word8, Buffer Char)
-&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-120"></span><span>       </span><span id="local-6989586621679545214"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545214"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545234"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545214"><span class="hs-identifier hs-var">c2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom2"><span class="hs-identifier hs-var">bom2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545224"><span class="hs-identifier hs-var">no_bom</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-122"></span><span>       </span><span class="hs-comment">-- found a BOM, ignore it and carry on</span><span>
</span><span id="line-123"></span><span>       </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545238"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-124"></span><span>       </span><span class="annot"><span class="annottext">CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_decode"><span class="hs-identifier hs-var">utf8_decode</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545237"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufL :: Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545232"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545228"><span class="hs-identifier hs-var">output</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_encode"><span class="hs-identifier hs-type">utf8_bom_encode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#EncodeBuffer"><span class="hs-identifier hs-type">EncodeBuffer</span></a></span><span>
</span><span id="line-127"></span><span id="utf8_bom_encode"><span class="annot"><span class="annottext">utf8_bom_encode :: IORef Bool -&gt; CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_bom_encode"><span class="hs-identifier hs-var hs-var">utf8_bom_encode</span></a></span></span><span> </span><span id="local-6989586621679545211"><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545211"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span id="local-6989586621679545210"><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545210"><span class="hs-identifier hs-var">input</span></a></span></span><span>
</span><span id="line-128"></span><span>  </span><span id="local-6989586621679545209"><span class="annot"><span class="annottext">output :: Buffer Word8
</span><a href="#local-6989586621679545209"><span class="hs-identifier hs-var">output</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.IO.Buffer.html#Buffer"><span class="hs-identifier hs-type">Buffer</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufRaw :: forall e. Buffer e -&gt; RawBuffer e
</span><a href="GHC.IO.Buffer.html#bufRaw"><span class="hs-identifier hs-var">bufRaw</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545208"><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545208"><span class="hs-identifier hs-var">oraw</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufL :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufR :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545207"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545207"><span class="hs-identifier hs-var">ow</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufSize :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufSize"><span class="hs-identifier hs-var">bufSize</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545206"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545206"><span class="hs-identifier hs-var">os</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-129"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-130"></span><span>  </span><span id="local-6989586621679545205"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679545205"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; IO Bool
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545211"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679545205"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_encode"><span class="hs-identifier hs-var">utf8_encode</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545210"><span class="hs-identifier hs-var">input</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545209"><span class="hs-identifier hs-var">output</span></a></span><span>
</span><span id="line-132"></span><span>           </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545206"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545207"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-133"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(CodingProgress, Buffer Char, Buffer Word8)
-&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#OutputUnderflow"><span class="hs-identifier hs-var">OutputUnderflow</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545210"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545209"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-135"></span><span>                    </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621679545211"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-136"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545208"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545207"><span class="hs-identifier hs-var">ow</span></a></span><span>     </span><span class="annot"><span class="annottext">Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom0"><span class="hs-identifier hs-var">bom0</span></a></span><span>
</span><span id="line-137"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545208"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545207"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom1"><span class="hs-identifier hs-var">bom1</span></a></span><span>
</span><span id="line-138"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545208"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545207"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom2"><span class="hs-identifier hs-var">bom2</span></a></span><span>
</span><span id="line-139"></span><span>                    </span><span class="annot"><span class="annottext">CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_encode"><span class="hs-identifier hs-var">utf8_encode</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545210"><span class="hs-identifier hs-var">input</span></a></span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545209"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufR :: Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545207"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#bom0"><span class="hs-identifier hs-type">bom0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#bom1"><span class="hs-identifier hs-type">bom1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#bom2"><span class="hs-identifier hs-type">bom2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-142"></span><span id="bom0"><span class="annot"><span class="annottext">bom0 :: Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom0"><span class="hs-identifier hs-var hs-var">bom0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xef</span></span><span>
</span><span id="line-143"></span><span id="bom1"><span class="annot"><span class="annottext">bom1 :: Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom1"><span class="hs-identifier hs-var hs-var">bom1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xbb</span></span><span>
</span><span id="line-144"></span><span id="bom2"><span class="annot"><span class="annottext">bom2 :: Word8
</span><a href="GHC.IO.Encoding.UTF8.html#bom2"><span class="hs-identifier hs-var hs-var">bom2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xbf</span></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_decode"><span class="hs-identifier hs-type">utf8_decode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#DecodeBuffer"><span class="hs-identifier hs-type">DecodeBuffer</span></a></span><span>
</span><span id="line-147"></span><span id="utf8_decode"><span class="annot"><span class="annottext">utf8_decode :: CodeBuffer Word8 Char
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_decode"><span class="hs-identifier hs-var hs-var">utf8_decode</span></a></span></span><span> </span><span>
</span><span id="line-148"></span><span>  </span><span id="local-6989586621679545202"><span class="annot"><span class="annottext">input :: Buffer Word8
</span><a href="#local-6989586621679545202"><span class="hs-identifier hs-var">input</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.IO.Buffer.html#Buffer"><span class="hs-identifier hs-type">Buffer</span></a></span><span class="hs-special">{</span><span>  </span><span class="annot"><span class="annottext">bufRaw :: forall e. Buffer e -&gt; RawBuffer e
</span><a href="GHC.IO.Buffer.html#bufRaw"><span class="hs-identifier hs-var">bufRaw</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545201"><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufL :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545200"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545200"><span class="hs-identifier hs-var">ir0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufR :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545199"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545199"><span class="hs-identifier hs-var">iw</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">bufSize :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufSize"><span class="hs-identifier hs-var">bufSize</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-149"></span><span>  </span><span id="local-6989586621679545198"><span class="annot"><span class="annottext">output :: Buffer Char
</span><a href="#local-6989586621679545198"><span class="hs-identifier hs-var">output</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.IO.Buffer.html#Buffer"><span class="hs-identifier hs-type">Buffer</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufRaw :: forall e. Buffer e -&gt; RawBuffer e
</span><a href="GHC.IO.Buffer.html#bufRaw"><span class="hs-identifier hs-var">bufRaw</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545197"><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545197"><span class="hs-identifier hs-var">oraw</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufL :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">bufR :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545196"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545196"><span class="hs-identifier hs-var">ow0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufSize :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufSize"><span class="hs-identifier hs-var">bufSize</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545195"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545195"><span class="hs-identifier hs-var">os</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-150"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span>
</span><span id="line-151"></span><span>       </span><span id="local-6989586621679545098"><span class="annot"><span class="annottext">loop :: Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545098"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679545097"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679545096"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span></span><span>
</span><span id="line-152"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545195"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#OutputUnderflow"><span class="hs-identifier hs-var">OutputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-153"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545199"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-154"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-155"></span><span>              </span><span id="local-6989586621679545094"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span>
</span><span id="line-156"></span><span>              </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-157"></span><span>                </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x7f</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span>
</span><span id="line-158"></span><span>                           </span><span id="local-6989586621679545092"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545092"><span class="hs-identifier hs-var">ow'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Char -&gt; Int -&gt; Char -&gt; IO Int
</span><a href="GHC.IO.Buffer.html#writeCharBuf"><span class="hs-identifier hs-var">writeCharBuf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545197"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Base.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>                           </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545098"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545092"><span class="hs-identifier hs-var">ow'</span></a></span><span>
</span><span id="line-160"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xc0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xc1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-comment">-- Overlong forms</span><span>
</span><span id="line-161"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xc2</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xdf</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-162"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545199"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-163"></span><span>                           </span><span id="local-6989586621679545087"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545087"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545087"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545087"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xc0</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-165"></span><span>                           </span><span id="local-6989586621679545085"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545085"><span class="hs-identifier hs-var">ow'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Char -&gt; Int -&gt; Char -&gt; IO Int
</span><a href="GHC.IO.Buffer.html#writeCharBuf"><span class="hs-identifier hs-var">writeCharBuf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545197"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Char
</span><a href="GHC.IO.Encoding.UTF8.html#chr2"><span class="hs-identifier hs-var">chr2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545087"><span class="hs-identifier hs-var">c1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>                           </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545098"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545085"><span class="hs-identifier hs-var">ow'</span></a></span><span>
</span><span id="line-167"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xe0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xef</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-168"></span><span>                      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545199"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-169"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-170"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-comment">-- check for an error even when we don't have</span><span>
</span><span id="line-171"></span><span>                                </span><span class="hs-comment">-- the full sequence yet (#3341)</span><span>
</span><span id="line-172"></span><span>                           </span><span id="local-6989586621679545083"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545083"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-173"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate3"><span class="hs-identifier hs-var">validate3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545083"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span class="hs-special">)</span><span> </span><span>
</span><span id="line-174"></span><span>                              </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-175"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-176"></span><span>                           </span><span id="local-6989586621679545081"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545081"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>                           </span><span id="local-6989586621679545080"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545080"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate3"><span class="hs-identifier hs-var">validate3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545081"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545080"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-179"></span><span>                           </span><span id="local-6989586621679545079"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545079"><span class="hs-identifier hs-var">ow'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Char -&gt; Int -&gt; Char -&gt; IO Int
</span><a href="GHC.IO.Buffer.html#writeCharBuf"><span class="hs-identifier hs-var">writeCharBuf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545197"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="GHC.IO.Encoding.UTF8.html#chr3"><span class="hs-identifier hs-var">chr3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545081"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545080"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span>                           </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545098"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545079"><span class="hs-identifier hs-var">ow'</span></a></span><span>
</span><span id="line-181"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xf0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-182"></span><span>                      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545199"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-183"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-184"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-comment">-- check for an error even when we don't have</span><span>
</span><span id="line-185"></span><span>                                </span><span class="hs-comment">-- the full sequence yet (#3341)</span><span>
</span><span id="line-186"></span><span>                           </span><span id="local-6989586621679545077"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545077"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate4"><span class="hs-identifier hs-var">validate4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545077"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>                              </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-189"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-190"></span><span>                           </span><span id="local-6989586621679545075"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545075"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>                           </span><span id="local-6989586621679545074"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545074"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate4"><span class="hs-identifier hs-var">validate4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545075"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545074"><span class="hs-identifier hs-var">c2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>                              </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-194"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-195"></span><span>                           </span><span id="local-6989586621679545073"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545073"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>                           </span><span id="local-6989586621679545072"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545072"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>                           </span><span id="local-6989586621679545071"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545071"><span class="hs-identifier hs-var">c3</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; IO Word8
</span><a href="GHC.IO.Buffer.html#readWord8Buf"><span class="hs-identifier hs-var">readWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545201"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate4"><span class="hs-identifier hs-var">validate4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545073"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545072"><span class="hs-identifier hs-var">c2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545071"><span class="hs-identifier hs-var">c3</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-199"></span><span>                           </span><span id="local-6989586621679545070"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545070"><span class="hs-identifier hs-var">ow'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Char -&gt; Int -&gt; Char -&gt; IO Int
</span><a href="GHC.IO.Buffer.html#writeCharBuf"><span class="hs-identifier hs-var">writeCharBuf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545197"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="GHC.IO.Encoding.UTF8.html#chr4"><span class="hs-identifier hs-var">chr4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545094"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545073"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545072"><span class="hs-identifier hs-var">c2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679545071"><span class="hs-identifier hs-var">c3</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>                           </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545098"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545070"><span class="hs-identifier hs-var">ow'</span></a></span><span>
</span><span id="line-201"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-202"></span><span>                           </span><span class="annot"><span class="annottext">IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var">invalid</span></a></span><span>
</span><span id="line-203"></span><span>         </span><span class="hs-keyword">where</span><span>
</span><span id="line-204"></span><span>           </span><span id="local-6989586621679545088"><span class="annot"><span class="annottext">invalid :: IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545088"><span class="hs-identifier hs-var hs-var">invalid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InvalidSequence"><span class="hs-identifier hs-var">InvalidSequence</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545097"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545096"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span>       </span><span class="hs-comment">-- lambda-lifted, to avoid thunks being built in the inner-loop:</span><span>
</span><span id="line-207"></span><span>       </span><span id="local-6989586621679545095"><span class="annot"><span class="annottext">done :: a -&gt; Int -&gt; Int -&gt; m (a, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545095"><span class="hs-identifier hs-var hs-var">done</span></a></span></span><span> </span><span id="local-6989586621679545063"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679545063"><span class="hs-identifier hs-var">why</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679545062"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545062"><span class="hs-identifier hs-var">ir</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679545061"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545061"><span class="hs-identifier hs-var">ow</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, Buffer Word8, Buffer Char) -&gt; m (a, Buffer Word8, Buffer Char)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679545063"><span class="hs-identifier hs-var">why</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-208"></span><span>                                  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545062"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545199"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545202"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufL :: Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufR :: Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-209"></span><span>                                              </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545202"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufL :: Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545062"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-210"></span><span>                                  </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545198"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufR :: Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545061"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>   </span><span class="hs-keyword">in</span><span>
</span><span id="line-212"></span><span>   </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Word8, Buffer Char)
</span><a href="#local-6989586621679545098"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545200"><span class="hs-identifier hs-var">ir0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545196"><span class="hs-identifier hs-var">ow0</span></a></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#utf8_encode"><span class="hs-identifier hs-type">utf8_encode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.Types.html#EncodeBuffer"><span class="hs-identifier hs-type">EncodeBuffer</span></a></span><span>
</span><span id="line-215"></span><span id="utf8_encode"><span class="annot"><span class="annottext">utf8_encode :: CodeBuffer Char Word8
</span><a href="GHC.IO.Encoding.UTF8.html#utf8_encode"><span class="hs-identifier hs-var hs-var">utf8_encode</span></a></span></span><span>
</span><span id="line-216"></span><span>  </span><span id="local-6989586621679545060"><span class="annot"><span class="annottext">input :: Buffer Char
</span><a href="#local-6989586621679545060"><span class="hs-identifier hs-var">input</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.IO.Buffer.html#Buffer"><span class="hs-identifier hs-type">Buffer</span></a></span><span class="hs-special">{</span><span>  </span><span class="annot"><span class="annottext">bufRaw :: forall e. Buffer e -&gt; RawBuffer e
</span><a href="GHC.IO.Buffer.html#bufRaw"><span class="hs-identifier hs-var">bufRaw</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545059"><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545059"><span class="hs-identifier hs-var">iraw</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufL :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545058"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545058"><span class="hs-identifier hs-var">ir0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufR :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545057"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545057"><span class="hs-identifier hs-var">iw</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">bufSize :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufSize"><span class="hs-identifier hs-var">bufSize</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-217"></span><span>  </span><span id="local-6989586621679545056"><span class="annot"><span class="annottext">output :: Buffer Word8
</span><a href="#local-6989586621679545056"><span class="hs-identifier hs-var">output</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.IO.Buffer.html#Buffer"><span class="hs-identifier hs-type">Buffer</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufRaw :: forall e. Buffer e -&gt; RawBuffer e
</span><a href="GHC.IO.Buffer.html#bufRaw"><span class="hs-identifier hs-var">bufRaw</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545055"><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufL :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">bufR :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545054"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545054"><span class="hs-identifier hs-var">ow0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufSize :: forall e. Buffer e -&gt; Int
</span><a href="GHC.IO.Buffer.html#bufSize"><span class="hs-identifier hs-var">bufSize</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621679545053"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545053"><span class="hs-identifier hs-var">os</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-218"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span>
</span><span id="line-219"></span><span>      </span><span id="local-6989586621679545049"><span class="annot"><span class="annottext">done :: a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var hs-var">done</span></a></span></span><span> </span><span id="local-6989586621679545048"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679545048"><span class="hs-identifier hs-var">why</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679545047"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545047"><span class="hs-identifier hs-var">ir</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679545046"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545046"><span class="hs-identifier hs-var">ow</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, Buffer Char, Buffer Word8) -&gt; m (a, Buffer Char, Buffer Word8)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679545048"><span class="hs-identifier hs-var">why</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-220"></span><span>                                 </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545047"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545057"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545060"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufL :: Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">bufR :: Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-221"></span><span>                                             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Buffer Char
</span><a href="#local-6989586621679545060"><span class="hs-identifier hs-var">input</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufL :: Int
</span><a href="GHC.IO.Buffer.html#bufL"><span class="hs-identifier hs-var">bufL</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545047"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-222"></span><span>                                 </span><span class="annot"><span class="annottext">Buffer Word8
</span><a href="#local-6989586621679545056"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bufR :: Int
</span><a href="GHC.IO.Buffer.html#bufR"><span class="hs-identifier hs-var">bufR</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545046"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-223"></span><span>      </span><span id="local-6989586621679544988"><span class="annot"><span class="annottext">loop :: Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679544988"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679544987"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679544986"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span></span><span>
</span><span id="line-224"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545053"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#OutputUnderflow"><span class="hs-identifier hs-var">OutputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-225"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545057"><span class="hs-identifier hs-var">iw</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InputUnderflow"><span class="hs-identifier hs-var">InputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span>
</span><span id="line-226"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-227"></span><span>           </span><span class="hs-special">(</span><span id="local-6989586621679544985"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544985"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544984"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544984"><span class="hs-identifier hs-var">ir'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RawBuffer Char -&gt; Int -&gt; IO (Char, Int)
</span><a href="GHC.IO.Buffer.html#readCharBuf"><span class="hs-identifier hs-var">readCharBuf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Char
</span><a href="#local-6989586621679545059"><span class="hs-identifier hs-var">iraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span>
</span><span id="line-228"></span><span>           </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544985"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-229"></span><span>             </span><span id="local-6989586621679544981"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544981"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544981"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x7F</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-230"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544981"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>                    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679544988"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544984"><span class="hs-identifier hs-var">ir'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544981"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x07FF</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-233"></span><span>                    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545053"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#OutputUnderflow"><span class="hs-identifier hs-var">OutputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-234"></span><span>                    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679544980"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544980"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544979"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544979"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; (Word8, Word8)
</span><a href="GHC.IO.Encoding.UTF8.html#ord2"><span class="hs-identifier hs-var">ord2</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544985"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-235"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span>     </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544980"><span class="hs-identifier hs-var">c1</span></a></span><span>
</span><span id="line-236"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544979"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-237"></span><span>                    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679544988"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544984"><span class="hs-identifier hs-var">ir'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544981"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xFFFF</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.IO.Encoding.Failure.html#isSurrogate"><span class="hs-identifier hs-var">isSurrogate</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544985"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#InvalidSequence"><span class="hs-identifier hs-var">InvalidSequence</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-239"></span><span>                    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545053"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#OutputUnderflow"><span class="hs-identifier hs-var">OutputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-240"></span><span>                    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679544976"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544976"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544975"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544975"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544974"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544974"><span class="hs-identifier hs-var">c3</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; (Word8, Word8, Word8)
</span><a href="GHC.IO.Encoding.UTF8.html#ord3"><span class="hs-identifier hs-var">ord3</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544985"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-241"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span>     </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544976"><span class="hs-identifier hs-var">c1</span></a></span><span>
</span><span id="line-242"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544975"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-243"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544974"><span class="hs-identifier hs-var">c3</span></a></span><span>
</span><span id="line-244"></span><span>                    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679544988"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544984"><span class="hs-identifier hs-var">ir'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-246"></span><span>                    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545053"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CodingProgress
-&gt; Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
forall {m :: * -&gt; *} {a}.
Monad m =&gt;
a -&gt; Int -&gt; Int -&gt; m (a, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679545049"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">CodingProgress
</span><a href="GHC.IO.Encoding.Types.html#OutputUnderflow"><span class="hs-identifier hs-var">OutputUnderflow</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544987"><span class="hs-identifier hs-var">ir</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-247"></span><span>                    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679544972"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544972"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544971"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544971"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544970"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544970"><span class="hs-identifier hs-var">c3</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679544969"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544969"><span class="hs-identifier hs-var">c4</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; (Word8, Word8, Word8, Word8)
</span><a href="GHC.IO.Encoding.UTF8.html#ord4"><span class="hs-identifier hs-var">ord4</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544985"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-248"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span>     </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544972"><span class="hs-identifier hs-var">c1</span></a></span><span>
</span><span id="line-249"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544971"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-250"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544970"><span class="hs-identifier hs-var">c3</span></a></span><span>
</span><span id="line-251"></span><span>                    </span><span class="annot"><span class="annottext">RawBuffer Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
</span><a href="GHC.IO.Buffer.html#writeWord8Buf"><span class="hs-identifier hs-var">writeWord8Buf</span></a></span><span> </span><span class="annot"><span class="annottext">RawBuffer Word8
</span><a href="#local-6989586621679545055"><span class="hs-identifier hs-var">oraw</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544969"><span class="hs-identifier hs-var">c4</span></a></span><span>
</span><span id="line-252"></span><span>                    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679544988"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544984"><span class="hs-identifier hs-var">ir'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544986"><span class="hs-identifier hs-var">ow</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>   </span><span class="hs-keyword">in</span><span>
</span><span id="line-254"></span><span>   </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO (CodingProgress, Buffer Char, Buffer Word8)
</span><a href="#local-6989586621679544988"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545058"><span class="hs-identifier hs-var">ir0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679545054"><span class="hs-identifier hs-var">ow0</span></a></span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- UTF-8 primitives, lifted from Data.Text.Fusion.Utf8</span><span>
</span><span id="line-258"></span><span>  </span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#ord2"><span class="hs-identifier hs-type">ord2</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span id="ord2"><span class="annot"><span class="annottext">ord2 :: Char -&gt; (Word8, Word8)
</span><a href="GHC.IO.Encoding.UTF8.html#ord2"><span class="hs-identifier hs-var hs-var">ord2</span></a></span></span><span> </span><span id="local-6989586621679544967"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544967"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; (Word8, Word8) -&gt; (Word8, Word8)
forall a. (?callStack::CallStack) =&gt; Bool -&gt; a -&gt; a
</span><a href="GHC.Base.html#assert"><span class="hs-identifier hs-var hs-var">assert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544966"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544966"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x07ff</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544965"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544964"><span class="hs-identifier hs-var">x2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>      </span><span id="local-6989586621679544966"><span class="annot"><span class="annottext">n :: Int
</span><a href="#local-6989586621679544966"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544967"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-263"></span><span>      </span><span id="local-6989586621679544965"><span class="annot"><span class="annottext">x1 :: Word8
</span><a href="#local-6989586621679544965"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544966"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xC0</span></span><span>
</span><span id="line-264"></span><span>      </span><span id="local-6989586621679544964"><span class="annot"><span class="annottext">x2 :: Word8
</span><a href="#local-6989586621679544964"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544966"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3F</span></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#ord3"><span class="hs-identifier hs-type">ord3</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span id="ord3"><span class="annot"><span class="annottext">ord3 :: Char -&gt; (Word8, Word8, Word8)
</span><a href="GHC.IO.Encoding.UTF8.html#ord3"><span class="hs-identifier hs-var hs-var">ord3</span></a></span></span><span> </span><span id="local-6989586621679544949"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544949"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; (Word8, Word8, Word8) -&gt; (Word8, Word8, Word8)
forall a. (?callStack::CallStack) =&gt; Bool -&gt; a -&gt; a
</span><a href="GHC.Base.html#assert"><span class="hs-identifier hs-var hs-var">assert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544948"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x0800</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544948"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xffff</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544947"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544946"><span class="hs-identifier hs-var">x2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544945"><span class="hs-identifier hs-var">x3</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-269"></span><span>      </span><span id="local-6989586621679544948"><span class="annot"><span class="annottext">n :: Int
</span><a href="#local-6989586621679544948"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544949"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-270"></span><span>      </span><span id="local-6989586621679544947"><span class="annot"><span class="annottext">x1 :: Word8
</span><a href="#local-6989586621679544947"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544948"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xE0</span></span><span>
</span><span id="line-271"></span><span>      </span><span id="local-6989586621679544946"><span class="annot"><span class="annottext">x2 :: Word8
</span><a href="#local-6989586621679544946"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544948"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3F</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-272"></span><span>      </span><span id="local-6989586621679544945"><span class="annot"><span class="annottext">x3 :: Word8
</span><a href="#local-6989586621679544945"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544948"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3F</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#ord4"><span class="hs-identifier hs-type">ord4</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span id="ord4"><span class="annot"><span class="annottext">ord4 :: Char -&gt; (Word8, Word8, Word8, Word8)
</span><a href="GHC.IO.Encoding.UTF8.html#ord4"><span class="hs-identifier hs-var hs-var">ord4</span></a></span></span><span> </span><span id="local-6989586621679544926"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544926"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; (Word8, Word8, Word8, Word8) -&gt; (Word8, Word8, Word8, Word8)
forall a. (?callStack::CallStack) =&gt; Bool -&gt; a -&gt; a
</span><a href="GHC.Base.html#assert"><span class="hs-identifier hs-var hs-var">assert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544925"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x10000</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544924"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544923"><span class="hs-identifier hs-var">x2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544922"><span class="hs-identifier hs-var">x3</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544921"><span class="hs-identifier hs-var">x4</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-277"></span><span>      </span><span id="local-6989586621679544925"><span class="annot"><span class="annottext">n :: Int
</span><a href="#local-6989586621679544925"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679544926"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-278"></span><span>      </span><span id="local-6989586621679544924"><span class="annot"><span class="annottext">x1 :: Word8
</span><a href="#local-6989586621679544924"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544925"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">18</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xF0</span></span><span>
</span><span id="line-279"></span><span>      </span><span id="local-6989586621679544923"><span class="annot"><span class="annottext">x2 :: Word8
</span><a href="#local-6989586621679544923"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544925"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3F</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-280"></span><span>      </span><span id="local-6989586621679544922"><span class="annot"><span class="annottext">x3 :: Word8
</span><a href="#local-6989586621679544922"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544925"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3F</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-281"></span><span>      </span><span id="local-6989586621679544921"><span class="annot"><span class="annottext">x4 :: Word8
</span><a href="#local-6989586621679544921"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679544925"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3F</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#chr2"><span class="hs-identifier hs-type">chr2</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-284"></span><span id="chr2"><span class="annot"><span class="annottext">chr2 :: Word8 -&gt; Word8 -&gt; Char
</span><a href="GHC.IO.Encoding.UTF8.html#chr2"><span class="hs-identifier hs-var hs-var">chr2</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544895"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544895"><span class="hs-identifier hs-var">x1#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544894"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544894"><span class="hs-identifier hs-var">x2#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-var">C#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Char#
</span><a href="../../ghc-prim/src/GHC.Prim.html#chr%23"><span class="hs-identifier hs-var">chr#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544893"><span class="hs-identifier hs-var">z1#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544892"><span class="hs-identifier hs-var">z2#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-285"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-286"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544891"><span class="annot"><span class="annottext">y1# :: Int#
</span><a href="#local-6989586621679544891"><span class="hs-identifier hs-var hs-var">y1#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544895"><span class="hs-identifier hs-var">x1#</span></a></span><span>
</span><span id="line-287"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544890"><span class="annot"><span class="annottext">y2# :: Int#
</span><a href="#local-6989586621679544890"><span class="hs-identifier hs-var hs-var">y2#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544894"><span class="hs-identifier hs-var">x2#</span></a></span><span>
</span><span id="line-288"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544893"><span class="annot"><span class="annottext">z1# :: Int#
</span><a href="#local-6989586621679544893"><span class="hs-identifier hs-var hs-var">z1#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544891"><span class="hs-identifier hs-var">y1#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0xC0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">6#</span></span><span>
</span><span id="line-289"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544892"><span class="annot"><span class="annottext">z2# :: Int#
</span><a href="#local-6989586621679544892"><span class="hs-identifier hs-var hs-var">z2#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544890"><span class="hs-identifier hs-var">y2#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0x80#</span></span><span>
</span><span id="line-290"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#chr2"><span class="hs-pragma hs-type">chr2</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#chr3"><span class="hs-identifier hs-type">chr3</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-293"></span><span id="chr3"><span class="annot"><span class="annottext">chr3 :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="GHC.IO.Encoding.UTF8.html#chr3"><span class="hs-identifier hs-var hs-var">chr3</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544889"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544889"><span class="hs-identifier hs-var">x1#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544888"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544888"><span class="hs-identifier hs-var">x2#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544887"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544887"><span class="hs-identifier hs-var">x3#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-var">C#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Char#
</span><a href="../../ghc-prim/src/GHC.Prim.html#chr%23"><span class="hs-identifier hs-var">chr#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544886"><span class="hs-identifier hs-var">z1#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544885"><span class="hs-identifier hs-var">z2#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544884"><span class="hs-identifier hs-var">z3#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-294"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-295"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544883"><span class="annot"><span class="annottext">y1# :: Int#
</span><a href="#local-6989586621679544883"><span class="hs-identifier hs-var hs-var">y1#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544889"><span class="hs-identifier hs-var">x1#</span></a></span><span>
</span><span id="line-296"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544882"><span class="annot"><span class="annottext">y2# :: Int#
</span><a href="#local-6989586621679544882"><span class="hs-identifier hs-var hs-var">y2#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544888"><span class="hs-identifier hs-var">x2#</span></a></span><span>
</span><span id="line-297"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544881"><span class="annot"><span class="annottext">y3# :: Int#
</span><a href="#local-6989586621679544881"><span class="hs-identifier hs-var hs-var">y3#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544887"><span class="hs-identifier hs-var">x3#</span></a></span><span>
</span><span id="line-298"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544886"><span class="annot"><span class="annottext">z1# :: Int#
</span><a href="#local-6989586621679544886"><span class="hs-identifier hs-var hs-var">z1#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544883"><span class="hs-identifier hs-var">y1#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0xE0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">12#</span></span><span>
</span><span id="line-299"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544885"><span class="annot"><span class="annottext">z2# :: Int#
</span><a href="#local-6989586621679544885"><span class="hs-identifier hs-var hs-var">z2#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544882"><span class="hs-identifier hs-var">y2#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0x80#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">6#</span></span><span>
</span><span id="line-300"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544884"><span class="annot"><span class="annottext">z3# :: Int#
</span><a href="#local-6989586621679544884"><span class="hs-identifier hs-var hs-var">z3#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544881"><span class="hs-identifier hs-var">y3#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0x80#</span></span><span>
</span><span id="line-301"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#chr3"><span class="hs-pragma hs-type">chr3</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#chr4"><span class="hs-identifier hs-type">chr4</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-304"></span><span id="chr4"><span class="annot"><span class="annottext">chr4 :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="GHC.IO.Encoding.UTF8.html#chr4"><span class="hs-identifier hs-var hs-var">chr4</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544880"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544880"><span class="hs-identifier hs-var">x1#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544879"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544879"><span class="hs-identifier hs-var">x2#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544878"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544878"><span class="hs-identifier hs-var">x3#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621679544877"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544877"><span class="hs-identifier hs-var">x4#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-305"></span><span>    </span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-var">C#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Char#
</span><a href="../../ghc-prim/src/GHC.Prim.html#chr%23"><span class="hs-identifier hs-var">chr#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544876"><span class="hs-identifier hs-var">z1#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544875"><span class="hs-identifier hs-var">z2#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544874"><span class="hs-identifier hs-var">z3#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544873"><span class="hs-identifier hs-var">z4#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-307"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544872"><span class="annot"><span class="annottext">y1# :: Int#
</span><a href="#local-6989586621679544872"><span class="hs-identifier hs-var hs-var">y1#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544880"><span class="hs-identifier hs-var">x1#</span></a></span><span>
</span><span id="line-308"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544871"><span class="annot"><span class="annottext">y2# :: Int#
</span><a href="#local-6989586621679544871"><span class="hs-identifier hs-var hs-var">y2#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544879"><span class="hs-identifier hs-var">x2#</span></a></span><span>
</span><span id="line-309"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544870"><span class="annot"><span class="annottext">y3# :: Int#
</span><a href="#local-6989586621679544870"><span class="hs-identifier hs-var hs-var">y3#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544878"><span class="hs-identifier hs-var">x3#</span></a></span><span>
</span><span id="line-310"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544869"><span class="annot"><span class="annottext">y4# :: Int#
</span><a href="#local-6989586621679544869"><span class="hs-identifier hs-var hs-var">y4#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679544877"><span class="hs-identifier hs-var">x4#</span></a></span><span>
</span><span id="line-311"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544876"><span class="annot"><span class="annottext">z1# :: Int#
</span><a href="#local-6989586621679544876"><span class="hs-identifier hs-var hs-var">z1#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544872"><span class="hs-identifier hs-var">y1#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0xF0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">18#</span></span><span>
</span><span id="line-312"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544875"><span class="annot"><span class="annottext">z2# :: Int#
</span><a href="#local-6989586621679544875"><span class="hs-identifier hs-var hs-var">z2#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544871"><span class="hs-identifier hs-var">y2#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0x80#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">12#</span></span><span>
</span><span id="line-313"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544874"><span class="annot"><span class="annottext">z3# :: Int#
</span><a href="#local-6989586621679544874"><span class="hs-identifier hs-var hs-var">z3#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544870"><span class="hs-identifier hs-var">y3#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0x80#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">6#</span></span><span>
</span><span id="line-314"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679544873"><span class="annot"><span class="annottext">z4# :: Int#
</span><a href="#local-6989586621679544873"><span class="hs-identifier hs-var hs-var">z4#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679544869"><span class="hs-identifier hs-var">y4#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0x80#</span></span><span>
</span><span id="line-315"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#chr4"><span class="hs-pragma hs-type">chr4</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-type">between</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>                </span><span class="hs-comment">-- ^ byte to check</span><span>
</span><span id="line-318"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>                </span><span class="hs-comment">-- ^ lower bound</span><span>
</span><span id="line-319"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>                </span><span class="hs-comment">-- ^ upper bound</span><span>
</span><span id="line-320"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-321"></span><span id="between"><span class="annot"><span class="annottext">between :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var hs-var">between</span></a></span></span><span> </span><span id="local-6989586621679544867"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544867"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679544866"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544866"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679544865"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544865"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544867"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544866"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544867"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544865"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-322"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-pragma hs-type">between</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#validate3"><span class="hs-identifier hs-type">validate3</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-325"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#validate3"><span class="hs-pragma hs-type">validate3</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-326"></span><span id="validate3"><span class="annot"><span class="annottext">validate3 :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate3"><span class="hs-identifier hs-var hs-var">validate3</span></a></span></span><span> </span><span id="local-6989586621679544864"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544864"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span id="local-6989586621679544863"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544863"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span id="local-6989586621679544862"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544862"><span class="hs-identifier hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544861"><span class="hs-identifier hs-var">validate3_1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-327"></span><span>                     </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544860"><span class="hs-identifier hs-var">validate3_2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-328"></span><span>                     </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544859"><span class="hs-identifier hs-var">validate3_3</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-329"></span><span>                     </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544858"><span class="hs-identifier hs-var">validate3_4</span></a></span><span>
</span><span id="line-330"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-331"></span><span>    </span><span id="local-6989586621679544861"><span class="annot"><span class="annottext">validate3_1 :: Bool
</span><a href="#local-6989586621679544861"><span class="hs-identifier hs-var hs-var">validate3_1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544864"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xE0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-332"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544863"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xA0</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-333"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544862"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-334"></span><span>    </span><span id="local-6989586621679544860"><span class="annot"><span class="annottext">validate3_2 :: Bool
</span><a href="#local-6989586621679544860"><span class="hs-identifier hs-var hs-var">validate3_2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544864"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xE1</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xEC</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-335"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544863"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-336"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544862"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-337"></span><span>    </span><span id="local-6989586621679544859"><span class="annot"><span class="annottext">validate3_3 :: Bool
</span><a href="#local-6989586621679544859"><span class="hs-identifier hs-var hs-var">validate3_3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544864"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xED</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-338"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544863"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x9F</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-339"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544862"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-340"></span><span>    </span><span id="local-6989586621679544858"><span class="annot"><span class="annottext">validate3_4 :: Bool
</span><a href="#local-6989586621679544858"><span class="hs-identifier hs-var hs-var">validate3_4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544864"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xEE</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xEF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-341"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544863"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-342"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544862"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#validate4"><span class="hs-identifier hs-type">validate4</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-345"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.IO.Encoding.UTF8.html#validate4"><span class="hs-pragma hs-type">validate4</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-346"></span><span id="validate4"><span class="annot"><span class="annottext">validate4 :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#validate4"><span class="hs-identifier hs-var hs-var">validate4</span></a></span></span><span> </span><span id="local-6989586621679544833"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544833"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span id="local-6989586621679544832"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544832"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span id="local-6989586621679544831"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544831"><span class="hs-identifier hs-var">x3</span></a></span></span><span> </span><span id="local-6989586621679544830"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544830"><span class="hs-identifier hs-var">x4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544829"><span class="hs-identifier hs-var">validate4_1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-347"></span><span>                        </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544828"><span class="hs-identifier hs-var">validate4_2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-348"></span><span>                        </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679544827"><span class="hs-identifier hs-var">validate4_3</span></a></span><span>
</span><span id="line-349"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span>
</span><span id="line-350"></span><span>    </span><span id="local-6989586621679544829"><span class="annot"><span class="annottext">validate4_1 :: Bool
</span><a href="#local-6989586621679544829"><span class="hs-identifier hs-var hs-var">validate4_1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544833"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xF0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-351"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544832"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x90</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-352"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544831"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-353"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544830"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-354"></span><span>    </span><span id="local-6989586621679544828"><span class="annot"><span class="annottext">validate4_2 :: Bool
</span><a href="#local-6989586621679544828"><span class="hs-identifier hs-var hs-var">validate4_2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544833"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xF1</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xF3</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-355"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544832"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-356"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544831"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-357"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544830"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-358"></span><span>    </span><span id="local-6989586621679544827"><span class="annot"><span class="annottext">validate4_3 :: Bool
</span><a href="#local-6989586621679544827"><span class="hs-identifier hs-var hs-var">validate4_3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544833"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xF4</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-359"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544832"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x8F</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-360"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544831"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-361"></span><span>                  </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="GHC.IO.Encoding.UTF8.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679544830"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x80</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0xBF</span></span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span></pre></body></html>